/* 导入响应式样式 */
@import './styles/responsive.css';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  background-color: #f5f5f5;
}

a {
  text-decoration: none;
}

#app {
  min-height: 100vh;
}

.el-container {
  min-height: 100vh;
}

.el-main {
  padding: 0;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式基础设置 */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  body {
    font-size: 14px;
  }
}

/* 移动端适配 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input, textarea, [contenteditable] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* 响应式图片 */
img {
  max-width: 100%;
  height: auto;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .el-button {
    min-height: 44px;
  }

  .el-input__inner {
    min-height: 44px;
  }

  .el-select .el-input__inner {
    min-height: 44px;
  }

  .el-checkbox__inner {
    width: 20px;
    height: 20px;
  }

  .el-radio__inner {
    width: 20px;
    height: 20px;
  }
}

/* 安全区域适配 */
.safe-area-inset-top {
  padding-top: env(safe-area-inset-top);
}

.safe-area-inset-right {
  padding-right: env(safe-area-inset-right);
}

.safe-area-inset-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.safe-area-inset-left {
  padding-left: env(safe-area-inset-left);
}